home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / text / hyper / ADtoHT2_1.lha / Source.lha / File.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-22  |  1.1 KB  |  51 lines

  1. #ifndef FILE_H
  2. #define FILE_H
  3.  
  4. #ifndef EXEC_TYPES_H
  5. #include <exec/types.h>
  6. #endif
  7.  
  8. /************************************************************************/
  9.  
  10. struct Word            /* Note: EOF returns an empty word */
  11.   {
  12.     struct MinNode Node;
  13.  
  14.     unsigned long Line;        /* file position of word */
  15.  
  16.     int Whitespace;        /* how much whitespace between this word and the prev word? */
  17.     int Newline;        /* how many newlines *before* the whitespace? */
  18.  
  19.     int Special;        /* is this a special word? */
  20.  
  21.     size_t Length;        /* strlen(Word) */
  22.     char Word[1];
  23.   };
  24.  
  25. extern char *ReadFilename;
  26. extern char *WriteFilename;
  27.  
  28. /************************************************************************/
  29.  
  30. void ROpen (int, char *);
  31. void RClose (void);
  32.  
  33. struct Word *ReadWord (int);
  34. void UnreadWord (struct Word *);
  35.  
  36. char *ReadUntil (char *);
  37. long ReadSkip (void);
  38.  
  39. void WOpen (int, char *);
  40. void WriteHeader (char *, char *);
  41. void WClose (void);
  42. void WriteWhitespace (struct Word *);
  43. void WriteWord (struct Word *);
  44. void WHeadline (char *);
  45.  
  46. void WPrintf (char *,...);
  47.  
  48. #define FreeWord(Word) free(Word)
  49.  
  50. #endif  /* FILE_H */
  51.